package com.foreknow.elmboot.service;

import com.foreknow.elmboot.po.DeliveryAddress;

import java.util.List;

public interface DeliveryAddressService {
    /**
     * 依据daId查询地址
     * @param daId
     * @return
     * @throws Exception
     */
    public DeliveryAddress queryAddressByDaId(Integer daId);

    /**
     * 依据userId查询地址
     * @param userId
     * @return
     * @throws Exception
     */
    public List<DeliveryAddress> queryAddressByUserId(String userId);

    /**
     * 添加地址
     * @param deliveryAddress
     * @return
     * @throws Exception
     */
    public int addAddress(DeliveryAddress deliveryAddress);

    /**
     * 删除地址
     * @param daId
     * @return
     * @throws Exception
     */
    public int deleteAddress(Integer daId);

    /**
     * 修改地址
     * @param deliveryAddress
     * @return
     * @throws Exception
     */
    public int updateAddress(DeliveryAddress deliveryAddress);
}
